#include "StdAfx.h"
#include "ShowDataTime.h"

#define SHOW_TIMER_ID	1
#define SHOW_TIMER_LEN	1000

CShowDataTime::CShowDataTime(void)
{
}

CShowDataTime::~CShowDataTime(void)
{
}

void CShowDataTime::OnInitLayer()
{
	SetTimer(SHOW_TIMER_ID, SHOW_TIMER_LEN);
	OnTimer(SHOW_TIMER_ID);
}

void CShowDataTime::OnTimer(WORD wIDEvent)
{
	if (wIDEvent == SHOW_TIMER_ID)
	{
		SYSTEMTIME st;
		GetLocalTime(&st);

		TCHAR szText[32] = {0};

		_stprintf(szText,_T("%02d:%02d"),
			st.wHour,
			st.wMinute
			);
		SetText(szText);
	}
}